package com.zk.mylib.func.activity

import android.content.pm.ActivityInfo
import android.os.Bundle
import android.util.Log
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.gc.logger.LogUtils
import com.gyf.immersionbar.BarHide
import com.gyf.immersionbar.ImmersionBar
import com.zk.mylib.R
import java.util.*
import kotlin.system.exitProcess

/**
 * 播放器全屏view
 */
class VideoPlayerActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_func_video_play)
        ImmersionBar.with(this)/*.statusBarDarkFont(false)*/.hideBar(BarHide.FLAG_HIDE_NAVIGATION_BAR).init()
        findViewById<Button>(R.id.bt_1).setOnClickListener {
            requestedOrientation=ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
            val task: TimerTask = object : TimerTask() {
                override fun run() {
                    LogUtils.e("aaaaaaaaaaaaaa","bbbbbbbbbbbbbb TimerTask run")
                }
            }
            val timer = Timer()
            LogUtils.e("aaaaaaaaaaaaaa","bbbbbbbbbbbbbb bt_1 click")
            timer.schedule(task, 2000)


        }
        findViewById<Button>(R.id.bt_2).setOnClickListener {
            requestedOrientation=ActivityInfo.SCREEN_ORIENTATION_PORTRAIT

        }


    }
}